import { getAction, postAction } from './manage'

// 登录
const login = (params) => postAction('/admin/login', params)
// 获取验证码
const getCode = (params) => getAction('/admin/code', params)
// 校验验证码
const validateCode = (id, params) => postAction(`/admin/validate/code/${id}`, params)
// 获取用户信息
const getInfo = (params) => getAction('/admin/user/info', params)
// 退出登录
const logout = (params) => postAction('/admin/logout', params)
// 图片上传
const uploadFile = (params) => postAction('/common/uploadImage', params)

export {
  login,
  getCode,
  validateCode,
  getInfo,
  logout,
  uploadFile
}
